home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / UTILITIE / UNIX_COH / 2774A.ZIP / TOOLS1.SHZ / TOOLS1 / Makefile < prev    next >
Makefile  |  1991-07-03  |  1KB  |  42 lines

  1. #    UID-Stuff
  2. #
  3. #    cuserid written by Rick Nickle (fcsys!trystro@think.com)
  4. #    other stuff ported (i.e., 'stolen') by same.
  5. #
  6. #    Makefile for certain uid-specific functions:
  7. #
  8. #FUNCTIONS:
  9. #    (cuserid.c)
  10. #    char *cuserid()            returns effective login
  11. #    (getutent.c)
  12. #    struct utmp *getutent()        return information 
  13. #    struct utmp *getutline()    about who is currently logged in.
  14. #
  15. #PROGRAMS:
  16. #    logname (logname.c)     command to print your effective
  17. #                login.  certain programs seem
  18. #                to need this command
  19. #NOTES:
  20. #    add the following to /usr/include/stdio.h:
  21. #
  22. #    char *cuserid();
  23. #
  24. #    add the following two lines to /usr/include/utmp.h:
  25. #
  26. #    extern    struct utmp *getutent();
  27. #    extern  struct utmp *getutline();
  28. #
  29. #I would automate this, but it seems easier (and safer) if you do it.
  30. #
  31. #If you wanna feel even more safe, take out the 'ar' lines in the following
  32. #and throw 'em back in after they compile.  They will not overwrite anything
  33. #in Coherent 3.1.0 though, because these functions are not included.
  34. #
  35. logname        :    logname.c
  36.         cc -c cuserid.c
  37.         cc -c getutent.c
  38.         ar rv /lib/libc.a getutent.o cuserid.o
  39.         cc logname.c
  40.         mv logname /usr/local/bin
  41.  
  42.